package com.junmo.admin.api;

import com.junmo.admin.api.fallback.UserFeignFallbackClient;
import com.junmo.admin.pojo.dto.AuthUserDTO;
import com.junmo.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(
        path = "/api/v1/users",
        value = "junmo-admin",
        fallback = UserFeignFallbackClient.class
)
public interface UserFeignClient {

    @GetMapping("/username/{username}")
    Result<AuthUserDTO> getUserByUsername(@PathVariable String username);
}
